<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>v-text指令</title>
    <script src="../js/vue.js"></script>
</head>
<body>
    <div id="root">
        <div>你好，{{name}}</div>
        <!-- (1) 只会直接替换掉标签体的内容 -->
        <div v-text="name"></div>、
        <!-- (2) 碰到html并不会自动解析
             (3 相比{{}},{{}}位置更加自由一些
        -->
        <div v-text="str"></div>
    </div>

    <script type='text/javascript'>
        new Vue({
           el:'#root',
           data:{
              name:'zhoujie',
              str:'<h3>string</h3>'
           }
        })
    </script>
</body>
</html>